const app = new Vue({
  el: "#app",
  // 在此处补全代码，实现二级菜单搜索功能
  data: {
    menuList: [],
    viewList: [],
    searchText: "text"
  },
  async created() {
    //TODO 使用axios  请求购物车列表
    axios.get('../10/data.json')
      .then(res => {
        this.menuList = this.viewList = res.data
        // console.log(this.menuList);
      })
      .catch(err => {
        console.log(err);
      })
  },
  methods: {
    search() {
      this.viewList = JSON.parse(JSON.stringify(this.viewList))
      let tempList = []
    }
  }
});
